﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class FarmDistrict : District
{
    public FarmDistrict(City city)
        : base(DistrictType.Farm, city)
    {
    }

    protected override bool IsCompleteDistrict(Dictionary<Building.BuildingType, int> typesInDistrict)
    {
        int farmCount = typesInDistrict.ContainsKey(Building.BuildingType.Farm) ? typesInDistrict[Building.BuildingType.Farm] : 0;
        int ranchCount = typesInDistrict.ContainsKey(Building.BuildingType.Ranch) ? typesInDistrict[Building.BuildingType.Ranch] : 0;

        if (farmCount + ranchCount >= 6) return true;

        return false;
    }

    protected override bool IsValidBuildingType(Building.BuildingType buildingType)
    {
        if (buildingType == Building.BuildingType.Farm) return true;
        if (buildingType == Building.BuildingType.Ranch) return true;

        return false;
    }

    protected override float GetDistrictScore(List<Building> buildings)
    {
        return 40;
    }

}
